﻿using LimaLims.Core.Entity.TestCenter;
using LimaLims.Core.Enum;
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations;


namespace LimaLims.Core.Entity.Equipment
{
    /// <summary>
    /// 报修工单
    /// </summary>
    [Comment("报修工单")]
    public class EquipmentRepair : DEntityTenant
    {
        /// <summary>
        /// 报修工单编号
        /// </summary>
        [Comment("报修工单编号")]
        public string Code { get; set; }

        /// <summary>
        /// 设备仪器ID
        /// </summary>
        [Comment("设备仪器ID")]
        public long EquipmentId { get; set; }

        public EquipmentInfo Equipment { get; set; }

        /// <summary>
        /// 故障描述
        /// </summary>
        [Comment("故障描述")]
        [MaxLength(100)]
        public string FaultDescription { get; set; }

        /// <summary>
        /// 故障情况拍照
        /// </summary>
        [Comment("故障情况拍照")]
        public string FaultImage { get; set; }

        /// <summary>
        /// 故障情况视频
        /// </summary>
        [Comment("故障情况视频")]
        public string FaultVideo { get; set; }

        /// <summary>
        /// 审核意见
        /// </summary>
        [Comment("审核意见")]
        public DealOpinon? DealOpinon { get; set; }

        /// <summary>
        /// 审核情况说明
        /// </summary>
        [Comment("审核情况说明")]
        [MaxLength(100)]
        public string DealDescription { get; set; }

        /// <summary>
        /// 审核人
        /// </summary>
        [Comment("审核人")]
        public string DealUser { get; set; }

        /// <summary>
        /// 审核时间
        /// </summary>
        [Comment("审核时间")]
        public DateTime? DealTime { get; set; }

        /// <summary>
        /// 是否修复
        /// </summary>
        [Comment("是否修复")]
        public bool? IsRepaired { get; set; }

        /// <summary>
        /// 验收情况说明
        /// </summary>
        [Comment("验收情况说明")]
        [MaxLength(100)]
        public string AcceptDescription { get; set; }

        /// <summary>
        /// 验收完成拍照
        /// </summary>
        [Comment("验收完成拍照")]
        public string AcceptImage { get; set; }

        /// <summary>
        /// 验收人
        /// </summary>
        [Comment("验收人")]
        public string AcceptUser { get; set; }

        /// <summary>
        /// 验收时间
        /// </summary>
        [Comment("验收时间")]
        public DateTime? AcceptTime { get; set; }

        /// <summary>
        /// 备份仪器状态
        /// </summary>
        [Comment("备份仪器状态")]
        public EquipmentStatus EquipmentStatusBackup { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [Comment("状态")]
        public DealStatus Status { get; set; }

        /// <summary>
        /// 打印单据
        /// </summary>
        [Comment("打印单据")]
        public string ReportUrl { get; set; }
    }
}
